package com.atde._04_structural_design_patterns.proxy.dynamic;




/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._04_structural_design_patterns.proxy.dynamic
 * @Author: Del
 * @CreateTime: 2025-06-24  00:30
 * @Description: 代理模式 --- 动态代理 --- 测试类
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 创建目标对象
        ITeacherDao target = new TeacherDaoImpl();

        // 给目标对象，创建代理对象
        ITeacherDao proxyInstance = (ITeacherDao) new ProxyFactory(target).getProxyInstance();
        System.out.println("代理对象：" + proxyInstance.getClass());

        proxyInstance.teach();
    }
}
